{#**
*
* 功能描述（列表模板）
*
* @author suoya <jlusuoya@gmail.com>
* @version 1
*#}
{#include file="header.tpl" title="title" active="prod" #}
{#include file="define.tpl" scope=parent#}
<div class="content middle">
    <div class="ui breadcrumb">
        <a class="section" href="index.php">主页</a>
        <i class="right"></i>
        <a class="active section">生产管理</a>
    </div>
    {#include file="search_bar.tpl" s_basic = ['status'=>[0,'状态', $g_prod_status]] s_vdate=['d_start'=>'最早送货', 'd_end'=>'最晚送货'] s_keys=['order_id'=>'订单号后缀','good_id'=>'商品编号']#}
    <table class="ui table segment">
        <thead>
            <tr>
                <th>序号</th>
                <th>订单号</th>
                <th>商品</th>
                <th>规格</th>
                <th>数量</th>
                <th>送货时间</th>
                <th>订单备注</th>
                <th>状态</th>
                <th>生产人</th>
                <th>完成时间</th>
                <th>提取人</th>
                <th>提取时间</th>
            </tr>
        </thead>
        <tbody>
            {#foreach $listdata as $item#}
                <tr>
                    <td>{#$item['id']#}</td>
                    <td><a href="index.php?action=prod.detail&id={#$item['order_id']#}">{#$item['order_id']+$orderid_base#}</a></td>
                    <td><a href="{#$web_root['web']#}index.php?action=food.detail&id={#$item['good_id']#}">{#$item['good_id']#}</a></td>
                    <td>{#$item['size']#}</td>
                    <td>{#$item['cnt']#}</td>
                    <td>{#$item['timelimit']#}</td>
                    <td>{#$item['note']#}</td>
                    <td>
                        {#if $item['status'] == 4#}
                            {#$g_prod_status[4]#}
                        {#else#}
                        <select onchange="ajax_value(this, 'index.php?action=prod.setstatus&id={#$item['item_id']#}&status=')">
                            {#foreach $g_prod_status as $k => $v#}
                                {#if $k != 4#}
                                    <option value="{#$k#}" {#if $item['status'] == $k#}selected="selected"{#/if#}>{#$v#}</option>
                                {#/if#}
                            {#/foreach#}
                        </select>
                        {#/if#}
                    </td>
                    <td>{#if $item['prod_adm'] != 0#}ID {#$item['prod_adm']#}{#/if#}</td>
                    {#if $item['status'] != 1#}<td>{#$item['finishtime']#}</td>{#else#}<td></td>{#/if#}
                    {#if $item['takeman'] != ''#}
                        <td>{#$item['takeman']#}</td><td>{#$item['taketime']#}</td>
                    {#else#}
                        <td><a href="index.php?action=prod.take&id={#$item['item_id']#}&man=" onclick="input_one(this);return false">指定提取人</a></td><td></td>
                    {#/if#}
                </tr>
            {#/foreach#}
        </tbody>
        <tfoot>
            <tr>
                <th colspan="13">
                    {#include file="paging_bar.tpl"#}
                </th>
            </tr>
        </tfoot>
    </table>
</div>
{#include file="footer.tpl" #}

